/* ***** BEGIN LICENSE BLOCK *****
 * Version: GPL 2.0
 *
 * The contents of this file are subject to the GNU General Public
 * License Version 2 or later (the "GPL").
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Initial Developer of the Original Code is
 *   MiniG.org project members
 *
 * ***** END LICENSE BLOCK ***** */

package fr.aliasource.webmail.common.tests;

import org.columba.ristretto.parser.MimeTypeParser;
import org.columba.ristretto.parser.ParserException;

import junit.framework.TestCase;

public class MimeParserSpeedTests extends TestCase {

	int count = 10000000;

	public void testSpeed() throws ParserException {

		long time;

		time = System.currentTimeMillis();

		for (int i = 0; i < count; i++) {
			MimeTypeParser.parse("text/plain");
			MimeTypeParser.parse("text/html");
		}

		time = System.currentTimeMillis() - time;
		System.out.println(count + " iterations in " + time + "ms. ");

	}

}
